package servlet;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.annotation.WebListener;

// ServletContextListener				ServletContext创建和销毁时
// ServletContextAttributeListener		ServletContext放入修改移除属性时

// HttpSessionAttributeListener
// ServletRequestAttributeListener

@WebListener
public class Listener4 implements ServletContextAttributeListener {

	@Override
	public void attributeAdded(ServletContextAttributeEvent scae) {
		System.out.println("属性被添加");
	}

	@Override
	public void attributeRemoved(ServletContextAttributeEvent scae) {
		System.out.println("属性被移除");
	}

	@Override
	public void attributeReplaced(ServletContextAttributeEvent scae) {
		System.out.println("属性被替换");
	}
}